﻿namespace CKFinder.Settings
{
    using System;
    using System.Web;

    public class Thumbnails
    {
        public string Dir = "";
        public bool DirectAccess = false;
        public bool Enabled = true;
        public int MaxHeight = 100;
        public int MaxWidth = 100;
        public int Quality = 80;
        public string Url = "";

        public string GetTargetDirectory()
        {
            if (this.Dir.Length == 0)
            {
                return HttpContext.Current.Server.MapPath(this.Url);
            }
            return this.Dir;
        }
    }
}

